package com.cscp.javastudy.juc.functionalprogramming.functioninterface;

import java.util.function.Consumer;

/**
 * Consumer: 只有输入没有返回值
 */
public class ConsumerInterfaceDemo1 {

    public static void main(String[] args) {
//        Consumer<String> consumer = new Consumer<String>() {
//            @Override
//            public void accept(String s) {
//                System.out.println(s);
//            }
//        };

        Consumer<String> consumer = (str)->{return;};
        consumer.accept("hello");
    }
}
